chore: code-review cleanup on today's shipped PRs (dead code + better errors) - #1141
Merged
Merged
Conversation
Three nits identified during post-merge review of #1119, #1133: 1. ContextMenu.tsx imported `removeNode` from the canvas store but stopped using it when the delete-confirm flow moved to Canvas in #1133. Also removed the now-unused mock entry in the keyboard test so the test inventory matches the real call list. 2. Preflight's YAML parse failure was a silent pass — defensible since the in-container preflight owns the schema, but invisible to ops if a template ships malformed YAML. Log at WARN so the signal surfaces without blocking the provision. 3. formatMissingEnvError rendered its slice via %q, producing `["A" "B"]` which is Go-literal-looking and ugly in a user-facing error. Join with ", " instead. Test updated to assert the new format. No behavioural changes beyond the log line; fixes are review nits, not bug fixes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
chore: code-review cleanup on today's shipped PRs (dead code + better errors)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three nits from post-merge review of #1119 / #1133:
Dead code — `ContextMenu.tsx` still imported `removeNode` from the store after fix(canvas): delete workspace dialog race with context menu close #1133 moved the delete confirm to Canvas. Removed. Same for the unused `removeNode` mock entry in `ContextMenu.keyboard.test.tsx`.
Silent preflight YAML parse failure — `missingRequiredEnv` returned `nil` on parse error (safe default, the in-container preflight owns schema), but left no trace for ops. Added a WARN log so malformed templates are visible.
User-facing error formatting — `formatMissingEnvError` used `%q` on a slice → `["A" "B"]`. Ugly and looks like a Go literal. Switched to `strings.Join(missing, ", ")`. Test updated.
Why direct-merge to main
User authorised direct-merge on review cleanup; zero behavioural impact beyond one log line.
Test plan